package hu.kisszoltan.boxescape.gui;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Polygon;

public abstract class GameObject {

	private static final long serialVersionUID = 1L;

	private Color color;

	protected GamePane parent;
	
	public GameObject(GamePane gamePane) {
		this.parent = gamePane;
	}

	public Color getColor() {
		return color;
	}

	public void setColor(Color color) {
		this.color = color;
	}

	public void moveToCenter() {
		moveTo(parent.getWidth() / 2, parent.getHeight() / 2);
	}

	public abstract void update();
	
	public abstract void moveTo(int x, int y);
	
	public abstract void moveBy(float scaleX, float scaleY);
	
	public abstract void paint(Graphics g);
	
	public abstract Polygon getPolygon();

	public boolean isPlayer() {
		return false;
	}

	public void reset() {
	}

	public void speedUp(int level) {
	}


}
